﻿<?xml version="1.0" encoding="utf-8"?>
<Object>
	<Object.Parameters>
		<Parameter Name="name" Type="String" />
	</Object.Parameters>
	<Object.Body>
		<Block>
			<Block.Expressions>
				<!-- If no name is provided, then get one. -->
				<If>
					<If.Test>
						<Call Name="String.IsNullOrWhiteSpace" Arguments="{name}" />
					</If.Test>
					<If.True>
						<Block>
							<Block.Expressions>
								<Call Name="Console.Write" Arguments="{'Please enter your name: '}" />
								<Assign Left="{name}">
									<Assign.Right>
										<Call Name="Console.ReadLine" />
									</Assign.Right>
								</Assign>
							</Block.Expressions>
						</Block>
					</If.True>
				</If>
				
				<!-- Greet the user. -->
				<Call Name="Console.WriteLine" Arguments="{'Hello, {0}!'},{name}" />
			</Block.Expressions>
		</Block>
	</Object.Body>
</Object>